<?php
$count = 10;
$client = new Swoole\Client(SWOOLE_SOCK_TCP);
if(!$client->connect('127.0.0.1',8090)) {
    echo "连接失败". PHP_EOL;
}
while (--$count > 0) {
    $client->send("我是客户端 你好 \n");
    echo $client->recv() . PHP_EOL;
    sleep(1);
}
$client->close();